home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Gamer Resource Kit / Hardcore Gamer Resource Kit - Disc 1.iso / tools / model_tools / md2view.txt < prev    next >
Text File  |  1997-12-10  |  6KB  |  177 lines

  1. ---------------------------------
  2. MD2 viewer for Quake 2 Models
  3. with source code
  4. v2.3
  5. December 11, 1997
  6. by Trey Harrison (trey@crack.com)
  7. ---------------------------------
  8.  
  9. -------------
  10. Instructions:
  11. -------------
  12.  
  13. I've added a glideemu.dll for those of you without 3dfx cards.
  14. Rename glideemu.dll to glide.dll, put it somewhere where
  15. Windows can find it (the best place is in the directory from
  16. which you run md2view), and make sure you're running Windows
  17. in 16-bit color.
  18.  
  19. Md2view is a command-line based program, and there are a lot
  20. of parameters. Dont worry, no list of -options to memorize, the md2view
  21. command-line interface is about as easy as it gets. You specify
  22. the model file (.md2), the .pak file (if you want to search
  23. the .pak for models and skins), the .pcx file (if you want to use
  24. a skin other than the one used by the .md2 file), or a .lst file
  25. (a regular text file like this one with 1 .pcx filename per line --
  26. a list of skins to view on the specified .md2 file).
  27.  
  28. * When you specify a .pak file, filenaming on the .md2 and .pcx files
  29.   becomes important. You must specify the path for those files as
  30.   it appears in the .pak file (dont foget the forward slashes '/').
  31.  
  32. * To find out what .md2's are IN the pak file, specify a pak file
  33.   and no .md2 file. It will write the names of all .md2 files found
  34.   in the .pak file to a file named "md2names.txt"
  35.  
  36. * If you specify a .pak file, and the specified .md2 or .pcx can't
  37.   be found in it, md2view will search through your external .pak
  38.   directories (the same way Quake does) for those files.
  39.  
  40. Examples (these are probably more useful than the above mess of instructions):
  41.  
  42. md2view c:\quake2\baseq2\pak0.pak models/monsters/tank/tris.md2
  43.  
  44. md2view tris.md2 (assumes you're in a directory containing tris.md2,
  45.                   and that directory also contains the skins that tris.md2
  46.                   needs)
  47.  
  48. md2view c:\quake2\baseq2\pak0.pak (will create md2names.txt)
  49.  
  50. I don't think you can do this:
  51.  
  52. md2view c:\asdf\tris.md2
  53.  
  54. because it will try to load skins from the directory which the
  55. program started in (not c:\asdf, most likely)
  56.  
  57. md2view tris.md2 skin.pcx
  58.  
  59. md2view tris.md2 skins.lst
  60.  
  61. This probably wont work:
  62.  
  63. md2view tris.md2 models/monsters/tank/skin.pcx
  64.  
  65. Because no pak file was specified.
  66.  
  67. ------------------------------
  68. Controls:
  69. (* = changed from version 2.1)
  70. ------------------------------
  71.  
  72. - You can rotate him around with the mouse similar to +mlook.
  73.  
  74. - You can zoom in and out with the left and right mouse buttons, OR
  75.   the A and Z keys.
  76.  
  77. - You can adjust the speed of animation with the + and - keys. (It
  78.   might only work with the + and - on the numeric keypad, I havent
  79.   checked)
  80.  
  81. - You can see what the animation looks like WITHOUT linear interpolation
  82.   by holding down the I key.
  83.  
  84. - You can move him in xy screen space with the arrow keys. This
  85.   is especially useful for taking screen shots.
  86.  
  87. - You can freeze the animation by holding down the F key. (Releasing
  88.   it resumes animation)
  89.  
  90. - You can take a screenshot by hitting the S key. (DONT hold it down)
  91.  
  92. * You can view different skins of the model by using keys 0-9
  93.   (skin #0 is at key '1', skin #1 at key '2', skin #9 at key '0')
  94.  
  95. * You can also use the TAB key to flip through the different skins.
  96.   (Shift+TAB flips backwards through the skin list)
  97.   
  98. * You can toggle between "skin" view and "model" view by hitting
  99.   enter.
  100.  
  101. For the Ambitious:
  102.  
  103. Position the model on screen using the mouse and arrow keys. Use +/-/F
  104. to get the model in the frame of animation you want. While holding
  105. F (to freeze the animation), tap S to take a screenshot.
  106.  
  107. ------------
  108. Screenshots:
  109. ------------
  110.  
  111. When you start md2view, it starts writing screenshot files with
  112. "shot0.tga". It will increment the number on the end of the filename
  113. every time you take another screenshot, but (as I just said) resets
  114. the number every time you restart.
  115.  
  116. Also, the screenshots seem dark, so you'll probably have to
  117. doctor them up in your favorite image editor.
  118.  
  119. ---------
  120. The code:
  121. ---------
  122.  
  123. It started out as my old mdldemo code, but lots changed. I commented
  124. some of it but not all. As it says at the top of each file, LEARN,
  125. dont steal. And don't laugh at my method of transforming / projecting /
  126. clipping the tris. It was a 5 minute hack =).
  127.  
  128. The .mdp and .mak files were built using MSVC 4.0. You'll also
  129. need the GLIDE SDK.
  130.  
  131. Feel free to add on to this code and release a better viewer
  132. (as long as you give credit where its due, *ahem*).
  133.  
  134. A nice GUI "front-end" that generates proper command line
  135. arguments probably wouldnt be hard for those who have actually
  136. taken the time to learn MFC.
  137.  
  138. ------------------
  139. The Glide Emulator
  140. ------------------
  141.  
  142. The emulator has extremely limited functionality, and I can pretty much
  143. guarantee that you wont get it to work with much other than
  144. md2view. I don't plan on releasing the code (sorry). Some key toggles
  145. for the emulator:
  146.  
  147. Space Bar - toggles the framerate display
  148. W         - toggles wireframe mode
  149.  
  150. -----
  151. Plug:
  152. -----
  153.  
  154. My real job involves me working on an extremely cool game
  155. called Golgotha. It is a combination of Doom and Warcraft
  156. and deserves a much better description than what I've
  157. written here. You can find more information and download
  158. our latest demo via the link listed below.
  159.  
  160. http://crack.com/games/golgotha
  161.  
  162. -------
  163. Thanks:
  164. -------
  165.  
  166. Thanks to John Carmack and Brian Hook for responding to my
  167. questions about the .md2 format, American McGee for putting up
  168. with all the messages I send him on ICQ, and Dave Taylor for
  169. tolerating the fact that I still write Quake/Quake2 utils.
  170.  
  171. Also thanks to |nsane for his helpful beta testing of the
  172. md2view <-> glideemu.dll combo and his wonderful suggestion
  173. of the .lst option.
  174.  
  175. Trey Harrison
  176. trey@crack.com
  177.